<?php
class LoginController extends AdminController {

	public function actionIndex () {
		$model = 'AdminUser';
		$adminUser = new $model();
		
		if (isset($_POST[$model])) {
			$adminUser->attributes = $_POST[$model];
			if ($adminUser->login()) $this->redirect('/admin');
		}
		
		$this->render('index', array(
			'adminUser' => $adminUser 
		));
	}
}
?>